package com.lee.entity;

/**
 * Created by liruopeng on 2017/12/6.
 */
public class SessionResult {
    private String srcIP;
    private int srcPort;
    private String dstIP;
    private int dstPort;
    private long startTime;
    private long endTime;
    private int recLen;
    private int sendLen;
    private String protocol;

    // statics data
    public int timeWindowSameDstCount;
    public int timeWindowDiffDstCount;
    public int timeWindowSameServiceCount;
    public float timeWindowSameDstPercent;
    public float timeWindowDiffDstPercent;

    public int countWindowSameDstCount;
    public int countWindowDiffDstCount;
    public int countWindowSameServiceCount;
    public float countWindowSameDstPercent;
    public float countWindowDiffDstPercent;


    @Override
    public String toString() {
        return "SessionResult{" +
                "srcIP='" + srcIP + '\'' +
                ", srcPort=" + srcPort +
                ", dstIP='" + dstIP + '\'' +
                ", dstPort=" + dstPort +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", recLen=" + recLen +
                ", sendLen=" + sendLen +
                ", protocol='" + protocol + '\'' +
                ", timeWindowSameDstCount=" + timeWindowSameDstCount +
                ", timeWindowDiffDstCount=" + timeWindowDiffDstCount +
                ", timeWindowSameServiceCount=" + timeWindowSameServiceCount +
                ", timeWindowSameDstPercent=" + timeWindowSameDstPercent +
                ", timeWindowDiffDstPercent=" + timeWindowDiffDstPercent +
                ", countWindowSameDstCount=" + countWindowSameDstCount +
                ", countWindowDiffDstCount=" + countWindowDiffDstCount +
                ", countWindowSameServiceCount=" + countWindowSameServiceCount +
                ", countWindowSameDstPercent=" + countWindowSameDstPercent +
                ", countWindowDiffDstPercent=" + countWindowDiffDstPercent +
                '}';
    }

    public float getCountWindowDiffDstPercent() {
        return countWindowDiffDstPercent;
    }

    public SessionResult setCountWindowDiffDstPercent(float countWindowDiffDstPercent) {
        this.countWindowDiffDstPercent = countWindowDiffDstPercent;
        return this;
    }

    public int getTimeWindowSameDstCount() {
        return timeWindowSameDstCount;
    }

    public SessionResult setTimeWindowSameDstCount(int timeWindowSameDstCount) {
        this.timeWindowSameDstCount = timeWindowSameDstCount;
        return this;
    }

    public int getTimeWindowDiffDstCount() {
        return timeWindowDiffDstCount;
    }

    public SessionResult setTimeWindowDiffDstCount(int timeWindowDiffDstCount) {
        this.timeWindowDiffDstCount = timeWindowDiffDstCount;
        return this;
    }

    public int getTimeWindowSameServiceCount() {
        return timeWindowSameServiceCount;
    }

    public SessionResult setTimeWindowSameServiceCount(int timeWindowSameServiceCount) {
        this.timeWindowSameServiceCount = timeWindowSameServiceCount;
        return this;
    }

    public float getTimeWindowSameDstPercent() {
        return timeWindowSameDstPercent;
    }

    public SessionResult setTimeWindowSameDstPercent(float timeWindowSameDstPercent) {
        this.timeWindowSameDstPercent = timeWindowSameDstPercent;
        return this;
    }

    public float getTimeWindowDiffDstPercent() {
        return timeWindowDiffDstPercent;
    }

    public SessionResult setTimeWindowDiffDstPercent(float timeWindowDiffDstPercent) {
        this.timeWindowDiffDstPercent = timeWindowDiffDstPercent;
        return this;
    }

    public int getCountWindowSameDstCount() {
        return countWindowSameDstCount;
    }

    public SessionResult setCountWindowSameDstCount(int countWindowSameDstCount) {
        this.countWindowSameDstCount = countWindowSameDstCount;
        return this;
    }

    public int getCountWindowDiffDstCount() {
        return countWindowDiffDstCount;
    }

    public SessionResult setCountWindowDiffDstCount(int countWindowDiffDstCount) {
        this.countWindowDiffDstCount = countWindowDiffDstCount;
        return this;
    }

    public int getCountWindowSameServiceCount() {
        return countWindowSameServiceCount;
    }

    public SessionResult setCountWindowSameServiceCount(int countWindowSameServiceCount) {
        this.countWindowSameServiceCount = countWindowSameServiceCount;
        return this;
    }

    public float getCountWindowSameDstPercent() {
        return countWindowSameDstPercent;
    }

    public SessionResult setCountWindowSameDstPercent(float countWindowSameDstPercent) {
        this.countWindowSameDstPercent = countWindowSameDstPercent;
        return this;
    }

    public SessionResult(){
        this.recLen = 0;
        this.sendLen = 0;
        this.protocol = "unknow";
    }


    public int getSrcPort() {
        return srcPort;
    }

    public SessionResult setSrcPort(int srcPort) {
        this.srcPort = srcPort;
        return this;
    }

    public int getDstPort() {
        return dstPort;
    }

    public SessionResult setDstPort(int dstPort) {
        this.dstPort = dstPort;
        return this;
    }

    public String getSrcIP() {
        return srcIP;
    }

    public SessionResult setSrcIP(String srcIP) {
        this.srcIP = srcIP;
        return this;
    }

    public String getDstIP() {
        return dstIP;
    }

    public SessionResult setDstIP(String dstIP) {
        this.dstIP = dstIP;
        return this;
    }

    public long getStartTime() {
        return startTime;
    }

    public SessionResult setStartTime(long startTime) {
        this.startTime = startTime;
        return this;
    }

    public long getEndTime() {
        return endTime;
    }

    public SessionResult setEndTime(long endTime) {
        this.endTime = endTime;
        return this;
    }

    public int getRecLen() {
        return recLen;
    }

    public SessionResult setRecLen(int recLen) {
        this.recLen = recLen;
        return this;
    }

    public int getSendLen() {
        return sendLen;
    }

    public SessionResult setSendLen(int sendLen) {
        this.sendLen = sendLen;
        return this;
    }

    public String getProtocol() {
        return protocol;
    }

    public SessionResult setProtocol(String protocol) {
        this.protocol = protocol;
        return this;
    }
}
